<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <!-- 
      <input v-model.trim="xx">  去除两边的空白
      <input v-model.number="xx">  转换输入框的字符为number类型（填数字才有效）
      <input v-model.lazy="xx">  输入框change时，才更新数据
     -->
    <h3>v-model修饰符 .trim .number .lazy</h3>
    姓名：<input type="text" v-model.trim="uname"><br>
    年纪：<input type="text" v-model.number="age"><br>
    手机：<input type="text" v-model.lazy="phone"><br>
  </div>
  <script src="./js/vue-2.7.14.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        uname: '',
        age: 20,
        phone: ''
      }
    })
  </script>
</body>

</html>